Skip to content

refactor(prisma-next)!: drop Encrypted prefix from v3 schema types; cipherstashFromStackV3 → cipherstashFromStack#685

Merged
coderdan merged 4 commits into
mainfrom
feat/prisma-next-rename-v3-types
Jul 18, 2026
Merged

refactor(prisma-next)!: drop Encrypted prefix from v3 schema types; cipherstashFromStackV3 → cipherstashFromStack#685
coderdan merged 4 commits into
mainfrom
feat/prisma-next-rename-v3-types

Conversation

@coderdan

@coderdan coderdan commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Renames the EQL v3 authoring surface to line up with the stack / Drizzle types.* catalog, per Dan's #683 review (comments 3 & 4). Stacked on #683 so the package rename and the skill land together.

What changed (public API)

  • v3 PSL column constructors drop Encrypted — the cipherstash. namespace already disambiguates:
    cipherstash.EncryptedTextSearch()cipherstash.TextSearch(), EncryptedDoubleOrd()DoubleOrd(), EncryptedBoolean()Boolean(), EncryptedJson()Json(), etc. Done at the single derivation seam (contract-authoring.ts v3PascalName).
  • cipherstashFromStackV3cipherstashFromStack (v3 is the default); the v2 setup fn becomes cipherstashFromStackV2.
  • camelCase TS-authoring exports drop encrypted in lockstep with the PSL constructors — encryptedTextSearchtextSearch, encryptedDoubleOrddoubleOrd, etc. (v3CamelName derives from the same coreName seam, and a property test enforces pascal/camel agree). The *V2 factories keep their names.

Deliberately unchanged

  • Runtime value envelopes (EncryptedString/EncryptedNumber/EncryptedBoolean/…) — a separate write-side surface; Dan asked to leave them.
  • The cipherstash.*V2 legacy column constructors and the encrypted*V2 camelCase factories.
  • Generated contract.json + codec ids — they key off codec ids, not constructor names, so no contract regeneration is needed (which neatly sidesteps the broken prisma-next contract emit on this branch — filed separately as it's pre-existing).
  • The eql* query operators.

Decisions (yours, documented)

  • Namespace stays cipherstash, not eql. It's the extension's vendor identity (CIPHERSTASH_SPACE_ID, woven through every cipherstash/eql-v3/* codec id and cipherstash:* invariant) — switching it would re-identify the whole extension and rewrite every codec id. Drizzle uses types. (a TS namespace), not eql., so there's no cross-adapter eql. precedent either.
  • v2 name = cipherstashFromStackV2 (your pick).

For @calvinbrewer (heads-up on your package)

  • The package README quick-start was already stale independent of this rename — it used cipherstash.EncryptedString(), which was never a valid v3 constructor (v3 text is Text*). I made it a coherent v3 example (TextSearch/DoubleOrd/DateOrd/Json) and wired db.ts to the v3 setup (cipherstashFromStack from /v3) so the snippet actually runs; please sanity-check it matches your intent.

Copilot review follow-up

Addressed the stale pre-rename references Copilot flagged (error messages, doc comments, README wiring, and the bundling-isolation marker-collision note whose substring direction flipped after the rename). No behavioural change.

Verification

  • Package builds clean (rename compiles); bundling-isolation 12/12; authoring / psl-interpretation / column-types / from-stack suites green; code:check clean.
  • Pre-existing failures (live-pg tests, properties.test.ts, migration-v3) are missing-devdep / needs-DB / needs-build issues on the branch, not this change.

Changeset: @cipherstash/prisma-next minor (breaking, rc convention) + stash patch (skill).

https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w

Summary by CodeRabbit

  • Breaking Changes

    • EQL v3 schema helpers and capability constructors drop the Encrypted prefix (e.g., cipherstash.TextSearch(), cipherstash.Boolean()).
    • The v3 one-call setup function is now cipherstashFromStack; use cipherstashFromStackV2 for v2 contracts.
    • TypeScript authoring factories follow the updated naming (e.g., textSearch, doubleOrd).
  • Documentation

    • Updated Prisma examples, READMEs, and the stash skill guide to use the new v3 naming and setup.
  • Tests

    • Adjusted EQL v3-related Prisma and live-PG tests to the renamed APIs.

@coderdan
coderdan requested a review from a team as a code owner July 17, 2026 08:00
@changeset-bot

changeset-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 81726f4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@cipherstash/prisma-next Minor
stash Minor
@cipherstash/prisma-next-example Patch
@cipherstash/basic-example Patch
@cipherstash/e2e Patch
@cipherstash/stack Minor
@cipherstash/stack-drizzle Minor
@cipherstash/stack-supabase Minor
@cipherstash/wizard Minor
@cipherstash/bench Patch
@cipherstash/test-kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR renames EQL v3 domain constructors and TypeScript factories to remove the Encrypted prefix, separates v2 and v3 stack setup APIs, and updates Prisma examples, tests, package documentation, and the Prisma skill.

Changes

EQL v3 API migration

Layer / File(s) Summary
Domain constructor and factory names
packages/prisma-next/src/contract-authoring.ts, packages/prisma-next/src/exports/column-types.ts, packages/prisma-next/test/*
V3 authoring and column factories use unprefixed names such as TextSearch, BigIntOrd, textSearch, and bigIntOrd, while preserving descriptor and capability expectations.
Versioned stack entry points
packages/prisma-next/src/exports/*, packages/prisma-next/src/stack/*, packages/prisma-next/test/*
The v3 setup function is exported as cipherstashFromStack; the v2 function is exported as cipherstashFromStackV2, with related validation messages and tests updated.
Examples and integration guidance
examples/prisma/*, packages/prisma-next/README.md, skills/stash-prisma-next/SKILL.md
Prisma schemas, runtime setup examples, E2E wiring, package documentation, and skill guidance use the renamed v3 APIs and explain v2/v3 contract handling.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: calvinbrewer

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 36.36% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title accurately captures the main breaking rename of v3 schema constructors and the stack entrypoint.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/prisma-next-rename-v3-types

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderdan
coderdan force-pushed the feat/prisma-next-cli-skill branch from 29d0ea5 to 65da67c Compare July 18, 2026 10:41
@coderdan
coderdan force-pushed the feat/prisma-next-rename-v3-types branch from 173092b to d0ed74f Compare July 18, 2026 10:42
Base automatically changed from feat/prisma-next-cli-skill to main July 18, 2026 12:01
coderdan added 3 commits July 18, 2026 22:02
…s; cipherstashFromStackV3 -> cipherstashFromStack

Aligns the EQL v3 authoring surface with the stack / Drizzle types.* catalog
(the cipherstash. namespace already disambiguates):

- v3 PSL column constructors drop the Encrypted prefix, at the single
  derivation seam (contract-authoring.ts v3PascalName): EncryptedTextSearch
  -> TextSearch, EncryptedDoubleOrd -> DoubleOrd, EncryptedBoolean -> Boolean,
  EncryptedJson -> Json, etc.
- v3 one-call setup: cipherstashFromStackV3 -> cipherstashFromStack (v3 is the
  default); the v2 setup fn becomes cipherstashFromStackV2.

Deliberately unchanged:
- runtime value envelopes (EncryptedString/Number/BigInt/Date/Boolean/Json) —
  a separate write-side surface; Dan asked to leave them as-is.
- the cipherstash.*V2 legacy column constructors.
- generated contract.json + codec ids (they key off codecIds, not constructor
  names — so no contract regeneration needed, which sidesteps the broken
   on this branch).
- the eql* query operators.
- camelCase TS-authoring exports (encryptedTextSearch, …) keep their prefix for
  now — a follow-up will align them (kept v3CamelName unchanged to avoid
  desyncing the static exports).

Namespace stays cipherstash (not eql): it is the extension's vendor identity
(CIPHERSTASH_SPACE_ID, woven through every cipherstash/eql-v3/* codec id and
cipherstash:* invariant) — switching it would re-identify the whole extension.

Updated: example schema.prisma + db.ts + e2e, both READMEs, the
stash-prisma-next skill, and the authoring/psl-interpretation tests. Verified:
package builds clean, bundling-isolation 12/12, authoring/psl/column-types/
from-stack suites green, code:check clean. (Pre-existing env failures — live
tests, properties, migration-v3 — are missing-devdep/DB issues, not this change.)

Stacked on #683. v2 name per Dan; namespace + scope calls documented above.

Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
…gree

CI (Node 22/24 unit job) caught what my local env masked: test/v3/properties.test.ts
asserts the PSL (pascal) and TS-authoring (camel) constructor names agree modulo
first-letter case. My earlier deferral of the camelCase exports broke that
invariant (pascal 'TextSearch' vs camel 'encryptedTextSearch'), and the property
test only runs with fast-check installed (absent locally, present in CI).

- v3CamelName drops the prefix too (encrypted<Core> -> lowercase-first<Core>),
  restoring the pascal/camel invariant.
- The 31 static TS-authoring exports rename in lockstep: encryptedTextSearch ->
  textSearch, encryptedDoubleOrd -> doubleOrd, encryptedBoolean -> boolean, etc.
  (column-types.ts + its two test consumers). The v2 encryptedStringV2 descriptors
  and the runtime encrypted*ParamsSchema arktype schemas are deliberately untouched.
- properties.test.ts: the assertion updated to the new convention (name does NOT
  start with 'Encrypted', is PascalCase, camel = lowercase-first(pascal)).
- Changeset updated: camelCase exports move with the PSL names (no longer deferred).

Ran the FULL prisma-next suite locally after `pnpm install` (which restored the
missing devdeps my earlier local runs lacked): 599 passed / 30 skipped, including
properties + column-types. Build clean, code:check clean.

Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
…on names

Follow-up to the camelCase rename: the 'no *OrdOre / no string factory'
negative assertions checked old-convention names (encryptedBigIntOrdOre,
encryptedString) that never existed either way — pass, but off-convention.
Now check the new-convention names (bigIntOrdOre, textOrdOre, string).

Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
@coderdan
coderdan force-pushed the feat/prisma-next-rename-v3-types branch from d0ed74f to 4d906cc Compare July 18, 2026 12:02
@coderdan
coderdan requested a review from Copilot July 18, 2026 12:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the @cipherstash/prisma-next EQL v3 authoring surface to align with the Stack/Drizzle types.* naming by removing the Encrypted prefix from v3 PSL constructors and making the v3 setup function the default cipherstashFromStack (with the v2 setup function renamed to cipherstashFromStackV2). It also propagates those renames through tests, examples, README, and the shipping stash-prisma-next skill, with a changeset capturing the breaking change.

Changes:

  • Rename v3 PSL constructors from cipherstash.Encrypted*()cipherstash.*() and update the derivation seam (v3PascalName / v3CamelName).
  • Rename setup entry points: cipherstashFromStackV3cipherstashFromStack (v3), and cipherstashFromStackcipherstashFromStackV2 (v2).
  • Update skill/docs/examples/tests + add changeset documenting the breaking surface rename.

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
skills/stash-prisma-next/SKILL.md Update published skill guide to new v3 constructor + setup names.
packages/prisma-next/test/v3/properties.test.ts Adjust property test to assert no Encrypted prefix for v3 constructors.
packages/prisma-next/test/v3/from-stack-v3.test.ts Rename v3 setup function usage and test descriptions.
packages/prisma-next/test/v3/column-types.test-d.ts Update dts tests for renamed TS factory exports.
packages/prisma-next/test/psl-interpretation.test.ts Update PSL interpretation tests to new constructor names.
packages/prisma-next/test/live/side-by-side-clients-live-pg.test.ts Update live coexistence test to use cipherstashFromStackV2 + v3 default name.
packages/prisma-next/test/live/helpers/harness.ts Update live harness to call renamed v3 setup entry point.
packages/prisma-next/test/live/bulk-encrypt-live-pg.test.ts Update live bulk-encrypt test header comment to new v3 setup name.
packages/prisma-next/test/from-stack-divergence.test.ts Rename v2 divergence tests to cipherstashFromStackV2.
packages/prisma-next/test/column-types.test.ts Update unit tests for renamed v3 TS factories.
packages/prisma-next/test/bundling-isolation.test.ts Update bundling-isolation test commentary around marker choice.
packages/prisma-next/test/authoring.test.ts Update authoring tests for new v3 constructor names.
packages/prisma-next/src/v3/from-stack-v3-validate.ts Update v3 override validation error prefix to cipherstashFromStack.
packages/prisma-next/src/v3/derive-schemas-v3.ts Update comments referencing v3 setup naming.
packages/prisma-next/src/stack/from-stack.ts Rename v2 setup export to cipherstashFromStackV2 + adjust errors/docs.
packages/prisma-next/src/stack/from-stack-v3.ts Rename v3 setup export to cipherstashFromStack + adjust errors/docs.
packages/prisma-next/src/exports/v3.ts Re-export v3 setup function under the new default name.
packages/prisma-next/src/exports/stack.ts Re-export v2 setup as cipherstashFromStackV2 and v3 setup as default.
packages/prisma-next/src/exports/column-types.ts Rename v3 TS factory exports to match new constructor naming.
packages/prisma-next/src/contract-authoring.ts Implement v3 naming transform without Encrypted prefix; adjust camelCase mapping.
packages/prisma-next/README.md Update README examples and naming references for new setup/constructor names.
examples/prisma/test/e2e/str-range.e2e.test.ts Update example test docs to reference cipherstash.TextSearch().
examples/prisma/test/e2e/mixed.e2e.test.ts Update e2e test to use cipherstashFromStack.
examples/prisma/src/db.ts Update example app wiring to use cipherstashFromStack.
examples/prisma/README.md Update example README constructor/setup names.
examples/prisma/prisma/schema.prisma Update example schema to new v3 constructor names.
.changeset/prisma-next-drop-encrypted-prefix.md Changeset documenting the breaking rename + skill update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/prisma-next/src/contract-authoring.ts
Comment thread packages/prisma-next/src/stack/from-stack.ts
Comment thread packages/prisma-next/src/stack/from-stack-v3.ts Outdated
Comment thread packages/prisma-next/test/bundling-isolation.test.ts Outdated
Comment thread packages/prisma-next/src/contract-authoring.ts
Comment thread packages/prisma-next/README.md
Comment thread packages/prisma-next/README.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/prisma-next/README.md`:
- Around line 50-55: Update the quick start wiring snippet to call the v3
initializer cipherstashFromStack instead of cipherstashFromStackV2, while
keeping the existing contractJson argument and imports otherwise unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b9d9fe6a-1e61-4b3b-9253-45ebd937613a

📥 Commits

Reviewing files that changed from the base of the PR and between 8872d1e and 4d906cc.

📒 Files selected for processing (27)
  • .changeset/prisma-next-drop-encrypted-prefix.md
  • examples/prisma/README.md
  • examples/prisma/prisma/schema.prisma
  • examples/prisma/src/db.ts
  • examples/prisma/test/e2e/mixed.e2e.test.ts
  • examples/prisma/test/e2e/str-range.e2e.test.ts
  • packages/prisma-next/README.md
  • packages/prisma-next/src/contract-authoring.ts
  • packages/prisma-next/src/exports/column-types.ts
  • packages/prisma-next/src/exports/stack.ts
  • packages/prisma-next/src/exports/v3.ts
  • packages/prisma-next/src/stack/from-stack-v3.ts
  • packages/prisma-next/src/stack/from-stack.ts
  • packages/prisma-next/src/v3/derive-schemas-v3.ts
  • packages/prisma-next/src/v3/from-stack-v3-validate.ts
  • packages/prisma-next/test/authoring.test.ts
  • packages/prisma-next/test/bundling-isolation.test.ts
  • packages/prisma-next/test/column-types.test.ts
  • packages/prisma-next/test/from-stack-divergence.test.ts
  • packages/prisma-next/test/live/bulk-encrypt-live-pg.test.ts
  • packages/prisma-next/test/live/helpers/harness.ts
  • packages/prisma-next/test/live/side-by-side-clients-live-pg.test.ts
  • packages/prisma-next/test/psl-interpretation.test.ts
  • packages/prisma-next/test/v3/column-types.test-d.ts
  • packages/prisma-next/test/v3/from-stack-v3.test.ts
  • packages/prisma-next/test/v3/properties.test.ts
  • skills/stash-prisma-next/SKILL.md

Comment thread packages/prisma-next/README.md Outdated
…README

Copilot review on #685 — the rename left several references pointing at the
old constructor names:

- from-stack-v3.ts / from-stack.ts: the "no columns found" errors told users to
  declare `cipherstash.Encrypted*()` — now `cipherstash.*()` (e.g.
  `cipherstash.TextSearch()`) for v3 and `cipherstash.Encrypted*V2()` for v2.
- contract-authoring.ts: the constructor-name doc said `Encrypted<Stem><Suffix>`;
  the prefix is dropped now (`eql_v3_bigint_ord` → `BigIntOrd`).
- bundling-isolation.test.ts: the marker-collision note had the substring
  direction backwards post-rename — `cipherstashFromStackV2` is NOT a substring
  of the v3 `cipherstashFromStack`; the hazard is now the reverse.
- README Quick start: the v3 schema example was wired to the v2 setup
  (`cipherstashFromStackV2` from `/stack`); use `cipherstashFromStack` from
  `/v3` so the snippet actually runs against a v3 contract.

No behavioural change. prisma-next build + 599 tests green.

Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
@coderdan

Copy link
Copy Markdown
Contributor Author

Human and I review (copilot and coderabbit).

@coderdan
coderdan merged commit 4923c0a into main Jul 18, 2026
14 checks passed
@coderdan
coderdan deleted the feat/prisma-next-rename-v3-types branch July 18, 2026 12:19
coderdan added a commit that referenced this pull request Jul 18, 2026
…shipped

Dan's review on #691: the `stash eql migration --prisma` copy said the flag
"ships with prisma-next EQL v3 support" / "not available yet" — but that support
has shipped (#655/#683/#685), and Prisma Next installs EQL v3 through its OWN
migration system (`prisma-next migration apply`), not through this command.

Reframed all five spots to current reality (not "coming soon", but "use
prisma-next migration apply"): the user-facing message + its doc comment, the
`eqlMigrationCommand` code comment, the `--prisma` flag help in the registry,
the changeset, and the stash-cli skill (which ships to customers).

No behaviour change — `--prisma` still fails with a pointer. Build + 566 tests green.

Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
coderdan added a commit that referenced this pull request Jul 18, 2026
…QL install) (#691)

* feat(cli): add `stash eql migration --drizzle` (v3, migration-first EQL install)

First of the three PRs in #690: make migration-first, ORM-agnostic EQL v3 install
the front door, so every integration sources install SQL from one place (the CLI's
bundled variants) instead of vendoring its own. This is the pattern that keeps
Drizzle Supabase-safe; prisma-next's superuser-on-Supabase failure is fixed by the
stacked follow-ups (`--prisma` emitter + removing prisma-next's baked baseline),
which land on top of the prisma-next EQL v3 work (#655).

`stash eql migration --drizzle [--supabase] [--name] [--out] [--dry-run]`:
- Generates a Drizzle custom migration (via `drizzle-kit generate --custom`, then
  injects the SQL) carrying the bundled EQL **v3** install script + the
  `cs_migrations` tracking schema — one `drizzle-kit migrate` does everything
  `stash encrypt …` needs.
- `--supabase` appends the v3 role grants (`eql_v3` + `eql_v3_internal` →
  anon/authenticated/service_role), matching `stash eql install --supabase`.
- v3 only — no `--eql-version` (prisma-next never shipped v2).
- `--prisma` is registered but fails with a pointer to #690 until the stacked PR.

The SQL assembly (`buildEqlV3MigrationSql`) is a pure, unit-tested function; the
drizzle-kit scaffold/inject orchestration reuses the proven helpers from the v2
`install --drizzle` path (`findGeneratedMigration`, `cleanupMigrationFile`, now
exported). Registry + dispatch + help + `stash-cli`/`stash-drizzle` skills updated.

Tests: 4 new unit (bundle present, grants gated on --supabase, tracking schema),
544 CLI unit green, manifest resolves the command, biome clean. Changeset: stash minor.

Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w

* fix(cli): harden `stash eql migration` per review (#691)

Addresses the review on #691 — correctness, security, telemetry, and coverage:

- Run the PROJECT-LOCAL drizzle-kit (`pnpm exec` / `npx --no-install`), not the
  `pnpm dlx`/`yarn dlx` download-and-run form, so it resolves the project's own
  drizzle.config.ts + schema. New shared `execCommand`/`execArgv` in init/utils
  (setup-prompt's private copy folded in).
- Invoke via `spawnSync` with an argv array instead of `execSync` on a shell
  string — a `--name` with spaces or shell metacharacters is now one inert token
  (no word-splitting, no command injection). Plus a `[\w-]+` name guard.
- Pass `--out` through to `drizzle-kit generate` (always) so the flag actually
  steers where the migration is written, and our lookup can't miss it.
- Validation exits and every abort throw `CliExit(1)` instead of `process.exit`,
  so the telemetry `finally` runs and the branches are unit-testable.
- Guard `loadBundledEqlSql` (corrupt bundle → clean error, not a fatal trace),
  add the missing `p.intro`, and call `printNextSteps()` so the now-preferred
  install path isn't less helpful than `eql install`.
- HELP banner lists `eql migration`.

Tests: 14 migration unit (target selection incl. `--supabase`-alone, name guard,
dry-run, argv threading, non-zero drizzle-kit, write-failure cleanup, SQL order),
3 `findGeneratedMigration` unit (now public API), e2e smoke + `eql migration
--help`. 557 unit / 65 e2e green, code:check clean.

Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w

* fix(cli): bun exec must not surprise-download; drop type-erased test cast

CodeRabbit review on #691:

- `execArgv`/`execCommand` bun case emitted `bun x`, which auto-installs a
  missing binary from npm — contradicting the "run a project-local binary,
  never surprise-download" contract these helpers exist to honour (the npm case
  already passes `--no-install`). Bun supports `--no-install`; pass it for both
  the argv and shell forms. Updated the setup-prompt assertion to match.
- migration.test.ts: replaced the type-erasing `undefined as unknown as
  writeFileSync` hoisted-mock placeholder with a throwing placeholder cast to the
  specific type — fails loud if the mock factory never runs, and drops the
  `as unknown` (test files are plugin-exempt, but this is cleaner).

CLI build + 566 unit tests green; biome clean.

Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w

* docs(cli): correct stale `--prisma` copy now that prisma-next v3 has shipped

Dan's review on #691: the `stash eql migration --prisma` copy said the flag
"ships with prisma-next EQL v3 support" / "not available yet" — but that support
has shipped (#655/#683/#685), and Prisma Next installs EQL v3 through its OWN
migration system (`prisma-next migration apply`), not through this command.

Reframed all five spots to current reality (not "coming soon", but "use
prisma-next migration apply"): the user-facing message + its doc comment, the
`eqlMigrationCommand` code comment, the `--prisma` flag help in the registry,
the changeset, and the stash-cli skill (which ships to customers).

No behaviour change — `--prisma` still fails with a pointer. Build + 566 tests green.

Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w

* docs(cli): correct `--prisma` copy to match #690 (planned emitter, not "use prisma-next")

My previous pass framed `--prisma` as "not supported — use `prisma-next
migration apply`", which contradicts #690: the `--prisma` emitter IS a planned
follow-up (PR3) that writes the install migration in the framework `Migration`
shape and lets prisma-next DROP its baked install baseline. Pointing users at
`prisma-next migration apply` is the very approach #690 replaces.

Reframe all five spots to "not available yet — the Prisma Next emitter is a
follow-up tracked in #690; use `--drizzle` today": the message + its doc comment,
the `eqlMigrationCommand` code comment, the `--prisma` flag help, the changeset,
and the stash-cli skill. (The `stash eql install` guard + stash-prisma-next skill
keep their `prisma-next migration apply` wording — that correctly describes the
current baked-baseline install, which is a different thing from this CLI emitter.)

No behaviour change. Build + 566 tests green.

Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants